package co.baiku.boot.v3.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * 通知数据
 * <pre>
 * 通知资源数据
 * json格式，见示例
 * </pre>
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class WeixinPayScoreCallbackResource<T> implements Serializable {
    /**
     * 加密算法类型
     * <pre>
     * 对授权结果数据进行加密的加密算法，目前只支持AEAD_AES_256_GCM。
     * 示例值：AEAD_AES_256_GCM
     * </pre>
     */
    private String algorithm;

    /**
     * 数据密文
     * <pre>
     * Base64编码后的授权/解除授权结果数据密文。
     * </pre>
     */
    private String ciphertext;
    /**
     * 来源类型,示例:payscore
     */
    @JsonProperty("original_type")
    private String originalType;
    /**
     * 加密使用的随机串。<br/>
     * 示例值：fdasflkja484w
     */
    private String nonce;
    /**
     * 附加数据
     */
    @JsonProperty("associated_data")
    private String associatedData;
    /**
     * 解密后的数据
     */
    private T data;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getAlgorithm() {
        return algorithm;
    }

    public void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }

    public String getCiphertext() {
        return ciphertext;
    }

    public void setCiphertext(String ciphertext) {
        this.ciphertext = ciphertext;
    }

    public String getNonce() {
        return nonce;
    }

    public void setNonce(String nonce) {
        this.nonce = nonce;
    }

    public String getAssociatedData() {
        return associatedData;
    }

    public void setAssociatedData(String associatedData) {
        this.associatedData = associatedData;
    }

    public String getOriginalType() {
        return originalType;
    }

    public void setOriginalType(String originalType) {
        this.originalType = originalType;
    }
}
